ATSUSetFontFeatures

Sets font features in a style object.

OSStatus ATSUSetFontFeatures (
                     ATSUStyle iStyle,
                     ItemCount iFeatureCount,
                     ATSUFontFeatureType iType[],
                     ATSUFontFeatureSelector iSelector[]);
iStyle
A reference of type ATSUStyle. Pass a reference to a valid style object whose font features you want to set. You cannot pass NULL for this parameter.

iFeatureCount
The number of font features you want to set. This value should correspond to the number of elements in the iType and iSelector arrays.

iType
An array of values of type ATSUFontFeatureType. Each element in the array must represent a valid feature type. You cannot pass NULL for this parameter.

iSelector
An array of values of type ATSUFontFeatureSelector. Each element in the array must represent a feature selector that is valid for the corresponding feature type in the iType parameter. You cannot pass NULL for this parameter.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUSetFontFeatures function sets one or more font feature(s). Unset font features retain their font-defined default values. To set a particular font feature, you must specify both the feature type and selector.

The order that ATSUSetFontFeatures sets font features depends on the font-defined order, not the chronological order in which they were set in a call to ATSUSetFontFeatures.

Prior to ATSUI 1.2, ATSUSetFontFeature would not remove contradictory font features. You are responsible for maintaining your own list and remove contradictory settings when they occur. Beginning with ATSUI 1.2, ATSUSetFontFeatures will remove contradictory font features.

SPECIAL CONSIDERATIONS
ATSUSetFontFeatures may allocate memory in your application heap, unless you designate a different heap by calling the function ATSUCreateMemorySetting.

VERSION NOTES
Available beginning with ATSUI 1.0. Beginning with ATSUI 1.2, if you set contradictory font features, ATSUSetFontFeatures will remove contradictory features. Prior to ATSUI 1.2, you should maintain a list of font feature settings and removing contradictory settings when they occur.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)